package util;

import java.util.ArrayList;

public class MarkedTags extends Parsable<MarkedTags> {

	Tuple3<TextList, Int, Int> val;

	public MarkedTags() {

	}

	public MarkedTags(ArrayList<String> lst, int i, int j) {
		val = new Tuple3<TextList, Int, Int>(new TextList(lst), new Int(i), new Int(j));
	}

	public MarkedTags(TextList fst, Int snd, Int thd) {
		val = new Tuple3<TextList, Int, Int>(fst,snd,thd);
	}

	public MarkedTags(Tuple3<TextList, Int, Int> tup) {
		if(tup != null)
		val = tup;
	}

	public MarkedTags(ArrayList<String> lst, long i, long j) {
		val = new Tuple3<TextList, Int, Int>(new TextList(lst), new Int(i), new Int(j));
	}

	public Tuple3<TextList, Int, Int> get() {
		return val;
	}

	public TextList get1st() {
		return val.fst;
	}

	public Int get2nd() {
		return val.snd;
	}

	public Int get3rd() {
		return val.thd;
	}

	@Override
	public MarkedTags parse(String str) {
		String[] vals = str.split("-");
		TextList list = (new TextList()).parse(vals[0]);
		Int snd = (new Int()).parse(vals[1]);
		Int thd = (new Int()).parse(vals[2]);
		return new MarkedTags(new Tuple3<TextList, Int, Int>(list, snd, thd));
	}

	@Override
	public String toString() {
		if (val != null)
			return val.toString();
		else
			return null;
	}
}
